<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>layui在线调试</title>
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all">
    <style>
        body{background: white;width: 100%}
        .color{ color: #1E9FFF!important;font-weight: bold}
        /*.select input{height: 35px!important;width: 200px}*/
        thead td{background: #3c8dbc!important;color: white}
    </style>
</head>
<body>
<!--<span class="layui-breadcrumb" style="margin-left: 10px;margin-top: 6px;display: block">-->
<!--<span class="color">学籍信息&nbsp;-&nbsp;单一查询</span>-->
<!--</span>-->
<fieldset class="layui-elem-field site-demo-button" style="margin-top: 10px;width: 100%">
    <legend style="font-size: 14px"><span class="color">成绩查询</span></legend>
    <table class="layui-table" lay-size="sm" style="width: 600px;margin-left: 10px">
        <tr>
            <td>
                <div class="selects">
                    <label>查询方式：</label>
                    <select>
                        <option>依学号 </option>
                        <option>--请选择--</option>
                        <option>依课程</option>
                    </select>
                </div>
            </td>
            <td></td>
        </tr>
        <tr>
            <td>
                <div class="selects">
                    <label>学年：</label>
                    <select>
                        <option>2015</option>
                        <option>--请选择--</option>
                        <option>2017</option>
                        <option>2016</option>
                        <option>2014</option>
                        <option>2013</option>
                        <option>2012</option>
                        <option>2011 </option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <label>学期：</label>
                    <select>
                        <option>第一学期</option>
                        <option>--请选择--</option>
                        <option>第二学期</option>
                    </select>
                </div>
            </td>
        </tr>
        <tr>
            <td>学号：<input type="text" style="width: 120px" placeholder="请输入学号" value="14610801152313"></td>
            <td>
                <input type="button" value="查询">
            </td>
        </tr>
    </table>
    <table class="layui-table" lay-size="sm" style="margin-left: 10px;width: 600px">
        <tr>
            <td>院系代码：01305004 院系名称：软件工程</td>
        </tr>
        <tr>
            <td>学号：14610801152313 姓名：黄森 年班：2统本软件1401</td>
        </tr>
    </table>


    <table class="layui-table" lay-size="sm">
        <thead>
        <td>序号</td>
        <td>学年</td>
        <td>学期</td>
        <td>科目</td>
        <td>必选修别</td>
        <td>学分</td>
        <td>评分</td>
        <td>修习成绩</td>
        <td>最终成绩</td>
        <td>重修状态</td>
        <td>成绩状态</td>
        <td>休课状态</td>
        <td>备注</td>
        <td>操作员</td>
        <td>操作时间</td>
        </thead>
        <tr>
            <td>1</td>
            <td>2015</td>
            <td>1</td>
            <td>(0294) 程序语言课程开发实习</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--请选择--</option>
                        <option>必修</option>
                        <option>选修</option>
                    </select>
                </div>
            </td>
            <td>3</td>
            <td>百分</td>
            <td><input type="text" disabled="true" value="86.0" style="width: 30px"></td>
            <td>82</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>及格重修</option>
                        <option>不及格重修</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>免修</option>
                        <option>补考</option>
                        <option>缓考</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>禁考</option>
                        <option>违规</option>
                        <option>缺考</option>
                    </select>
                </div>
            </td>
            <td><input type="text" disabled="true"></td>
            <td>admin</td>
            <td>2016/1/26 0:00:00</td>
        </tr>
        <tr>
            <td>2</td>
            <td>2015</td>
            <td>1</td>
            <td>(0294) 程序语言课程开发实习</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--请选择--</option>
                        <option>必修</option>
                        <option>选修</option>
                    </select>
                </div>
            </td>
            <td>3</td>
            <td>百分</td>
            <td><input type="text" disabled="true" value="81.0" style="width: 30px"></td>
            <td>89</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>及格重修</option>
                        <option>不及格重修</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>免修</option>
                        <option>补考</option>
                        <option>缓考</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>禁考</option>
                        <option>违规</option>
                        <option>缺考</option>
                    </select>
                </div>
            </td>
            <td><input type="text" disabled="true"></td>
            <td>admin</td>
            <td>2016/1/26 0:00:00</td>
        </tr>
        <tr>
            <td>3</td>
            <td>2015</td>
            <td>1</td>
            <td>(0294) 数据结构</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--请选择--</option>
                        <option>必修</option>
                        <option>选修</option>
                    </select>
                </div>
            </td>
            <td>4</td>
            <td>百分</td>
            <td><input type="text" disabled="true" value="76.0" style="width: 30px"></td>
            <td>76</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>及格重修</option>
                        <option>不及格重修</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>免修</option>
                        <option>补考</option>
                        <option>缓考</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>禁考</option>
                        <option>违规</option>
                        <option>缺考</option>
                    </select>
                </div>
            </td>
            <td><input type="text" disabled="true"></td>
            <td>admin</td>
            <td>2016/1/26 0:00:00</td>
        </tr>
        <tr>
            <td>4</td>
            <td>2015</td>
            <td>1</td>
            <td>Linux操作系统</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--请选择--</option>
                        <option>必修</option>
                        <option>选修</option>
                    </select>
                </div>
            </td>
            <td>2</td>
            <td>百分</td>
            <td><input type="text" disabled="true" value="66.0" style="width: 30px"></td>
            <td>75</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>及格重修</option>
                        <option>不及格重修</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>免修</option>
                        <option>补考</option>
                        <option>缓考</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>禁考</option>
                        <option>违规</option>
                        <option>缺考</option>
                    </select>
                </div>
            </td>
            <td><input type="text" disabled="true"></td>
            <td>admin</td>
            <td>2016/1/26 0:00:00</td>
        </tr>
        <tr>
            <td>5</td>
            <td>2015</td>
            <td>1</td>
            <td>数据库设计与应用</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--请选择--</option>
                        <option>必修</option>
                        <option>选修</option>
                    </select>
                </div>
            </td>
            <td>3</td>
            <td>百分</td>
            <td><input type="text" disabled="true" value="87.0" style="width: 30px"></td>
            <td>69</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>及格重修</option>
                        <option>不及格重修</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>免修</option>
                        <option>补考</option>
                        <option>缓考</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>禁考</option>
                        <option>违规</option>
                        <option>缺考</option>
                    </select>
                </div>
            </td>
            <td><input type="text" disabled="true"></td>
            <td>admin</td>
            <td>2016/1/26 0:00:00</td>
        </tr>
        <tr>
            <td>6</td>
            <td>2015</td>
            <td>1</td>
            <td>电子电路基础</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--请选择--</option>
                        <option>必修</option>
                        <option>选修</option>
                    </select>
                </div>
            </td>
            <td>2</td>
            <td>百分</td>
            <td><input type="text" disabled="true" value="96.0" style="width: 30px"></td>
            <td>68</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>及格重修</option>
                        <option>不及格重修</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>免修</option>
                        <option>补考</option>
                        <option>缓考</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>禁考</option>
                        <option>违规</option>
                        <option>缺考</option>
                    </select>
                </div>
            </td>
            <td><input type="text" disabled="true"></td>
            <td>admin</td>
            <td>2016/1/26 0:00:00</td>
        </tr>
        <tr>
            <td>7</td>
            <td>2015</td>
            <td>1</td>
            <td>(0331) 面向对象程序设计(Java)</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--请选择--</option>
                        <option>必修</option>
                        <option>选修</option>
                    </select>
                </div>
            </td>
            <td>4</td>
            <td>百分</td>
            <td><input type="text" disabled="true" value="91.0" style="width: 30px"></td>
            <td>86</td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>及格重修</option>
                        <option>不及格重修</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>免修</option>
                        <option>补考</option>
                        <option>缓考</option>
                    </select>
                </div>
            </td>
            <td>
                <div class="selects">
                    <select disabled="true">
                        <option>--选择--</option>
                        <option>禁考</option>
                        <option>违规</option>
                        <option>缺考</option>
                    </select>
                </div>
            </td>
            <td><input type="text" disabled="true"></td>
            <td>admin</td>
            <td>2016/1/26 0:00:00</td>
        </tr>
    </table>
</fieldset>
<script src="../../layui/layui.js"></script>
<script src="../../layui/jquery-1.12.4.min.js"></script>
<script>
    layui.use('element',"laydate", function(){
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
        var laydate = layui.laydate;

        //常规用法
        laydate.render({
            elem: '#test1'
        });
        //监听导航点击
        element.on('nav(demo)', function(elem){
            //console.log(elem)
            layer.msg(elem.text());
        });
    });
</script>
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //创建一个编辑器
        var editIndex = layedit.build('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            title: function(value){
                if(value.length < 5){
                    return '标题至少得5个字符啊';
                }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function(data){
            layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });

        //监听提交
        form.on('submit(demo1)', function(data){
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });


    });
</script>
</body>
</html>
